Configure proper proxy header pass to OpenAPI#7
Merged
gavlyukovskiy merged 1 commit intomainfrom Oct 20, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR configures proper proxy header passing to OpenAPI by replacing the custom Swagger reverse proxy configuration with Spring Boot's built-in forwarded headers strategy and nginx proxy headers.
Key changes:
- Replaces custom
SwaggerBehindReverseProxyConfigwith Spring's nativeserver.forward-headers-strategy=framework - Adds
X-Forwarded-Prefixheader in nginx configuration to properly handle the/apipath prefix - Removes the
OPEN_API_SUFFIXenvironment variable and related SpringDoc custom URL configurations
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| deployment/nginx.conf | Adds X-Forwarded-Prefix header to pass /api prefix to backend |
| deployment/docker-compose.yaml | Removes OPEN_API_SUFFIX env var, changes JVM_TOOL_OPTS to JAVA_OPTS, comments out watchtower service |
| deployment/README.md | Adds duplicated Operations section with same commands |
| backend/src/main/resources/application.properties | Enables Spring's forwarded headers strategy, removes custom OpenAPI suffix configuration |
| backend/src/main/java/net/hackyourfuture/coursehub/SwaggerBehindReverseProxyConfig.java | Removes entire custom Swagger reverse proxy configuration class |
| backend/src/main/java/net/hackyourfuture/coursehub/CourseHubApplication.java | Removes trailing blank line |
| .github/workflows/on-release-tag.yml | Sets working directory for frontend build job |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
aa59173 to
d29e99f
Compare
d29e99f to
8d81afa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.